home *** CD-ROM | disk | FTP | other *** search
/ Turnbull China Bikeride / Turnbull China Bikeride - Disc 1.iso / ARGONET / PD / PROGRAMMING / DESKLIBC / SOURCES.ZIP / DeskLib / !DLSources / Libraries / Icon / c / RadioInEsg < prev    next >
Text File  |  1995-07-08  |  2KB  |  44 lines

  1. /*
  2.     ####             #    #     # #
  3.     #   #            #    #       #          The FreeWare C library for
  4.     #   #  ##   ###  #  # #     # ###             RISC OS machines
  5.     #   # #  # #     # #  #     # #  #   ___________________________________
  6.     #   # ####  ###  ##   #     # #  #
  7.     #   # #        # # #  #     # #  #    Please refer to the accompanying
  8.     ####   ### ####  #  # ##### # ###    documentation for conditions of use
  9.     ________________________________________________________________________
  10.  
  11.     File:    Icon.RadioInEsg.c
  12.     Author:  Copyright © 1994 Lenny
  13.     Version: 0.01 (19 Nov 1994)
  14.     Purpose: Returns the icon_handle (within a specified ESG) which is SET.
  15.              Similar to Icon_WhichRadio, except the icons considered do
  16.              not need to be consecutively numbered.
  17.     History: 0.01 (19 Nov 94) : Added 'Icon_WhichRadioInEsg()'
  18.  
  19. */
  20.  
  21. /* --- LOAD HEADERS ------------------------------------------------------ */
  22.  
  23. /* --- DeskLib ----------------------------------------------------------- */
  24. #include "DeskLib:WimpSWIs.h"          /* Low-level WIMP commands          */
  25. #include "DeskLib:Icon.h"
  26.  
  27. /* === FUNCTION DEFINITIONS ============================================== */
  28.  
  29. extern int Icon_WhichRadioInEsg(window_handle wh, int esg)
  30. {
  31.   icon_handle           ih[2];
  32.   int                   mask, set;
  33.  
  34.   mask = 0x2F0000;  /* 'Selected' and 'ESG' fields of icondata */
  35.   set  = 0x200000 | (esg << 16);
  36.  
  37.   Wimp_WhichIcon(wh, ih, mask, set);
  38.  
  39.   return (int) (ih[0]);
  40.  
  41. }
  42.  
  43. /***************************************************************************/
  44.